﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Wildlifelist.aspx.vb" Inherits="Macrography.Wildlife" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="Img_Id" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="Img_Id" HeaderText="Img_Id" InsertVisible="False" 
                    ReadOnly="True" SortExpression="Img_Id" />
                <asp:BoundField DataField="Img_Description" HeaderText="Img_Description" 
                    SortExpression="Img_Description" />
                <asp:ImageField DataImageUrlField="Images">
                    <ControlStyle Height="200px" Width="200px" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="Img_id" 
                    DataNavigateUrlFormatString="WildlifeDetail.aspx?Img_Id={0}" Text="Detail" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:MacrgraphyConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:MacrgraphyConnectionString.ProviderName %>" 
            SelectCommand="SELECT [Img_Id], [Images], [Img_Description] FROM [Images] WHERE ([Cat_Id] = ?)">
            <SelectParameters>
                <asp:Parameter DefaultValue="4" Name="Cat_Id" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
    </p>
       
   </asp:Content>
